package practise.interview;

/**
 * Created by richard on 4/28/14.
 */
public class FundenmentalInterviews extends AbstractClassTest {
    String string ;
    @Override
    synchronized void method1() {
        short s1=1;
        s1=(short)(s1+1);//have to cast
        s1+=1;//this is ok
        TestForInnerClassInterface test = new TestForInnerClassInterface(){

            @Override
            public void method1() {

            }
        };

        AbstractClassTest abstractClassTest = new AbstractClassTest() {
            @Override
            void method1() {

            }
        };

        TestForInnerClass testForInnerClass = new TestForInnerClass(){
            @Override
            public void method1(){
                //override
            }
        };

    }

//    @Override error
//    static void method1(){
//
//    }
}
class TestForInnerClass{
    public void method1(){

    }
}

interface TestForInnerClassInterface{
    public void method1();
}

abstract class AbstractClassTest{
    abstract void method1();
//    synchronized abstract void method2(); error
//    native static abstract void method2(); error
}
